package com.webchat.common.enums.payment;

import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.NoArgsConstructor;

/**
 * @author 程序员七七， https://www.coderutil.com网站作者
 * @date 2024/11/9 03:53
 */
@Getter
@NoArgsConstructor
@AllArgsConstructor
public enum PaymentOrderStatusEnum {

    NEW(1, "新创建订单"),
    RUNNING(2, "进行中订单"),
    FINISHED(3, "正常结束的订单"),
    STOP(4, "过期后平台强制结束的订单"),
    ROLLBACK(5, "回滚类订单"),
    DELETED(6, "已删除");

    private Integer status;

    private String statusName;

    public static boolean allowPayment(Integer status) {
        return NEW.status.equals(status);
    }
}
